home *** CD-ROM | disk | FTP | other *** search
/ KeyGen Studio 2002 / KeyGen_Studio_2002.iso / Tutorials / Dos CrackMes / com / TEST4.ZIP / TEST4TUT / GENPASS.C < prev    next >
Encoding:
C/C++ Source or Header  |  1997-06-08  |  1.3 KB  |  32 lines

  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <conio.h>
  4.  
  5. char text[9];
  6. unsigned char bits[96];
  7. char password[13];
  8.  
  9. main()
  10. {
  11.   cputs("╔══════════════════════════════════════════════════════════════════════════════╗");
  12.   cputs("║                           TEST4 by LordByte SOLVED                           ║");
  13.   cputs("║                 All the hard work was done in 1997 by CR00CK                 ║");
  14.   cputs("║         Enter 8 chars to be contained on the end of 12 char password         ║");
  15.   cputs("║                  BTW: genpass.c is JUST 31 lines long!!!!!!                  ║");
  16.   cputs("╚══════════════════════════════════════════════════════════════════════════════╝");
  17.   do {
  18.     printf("\nEnter text (8 chars): ");
  19.     scanf("%8s", text);
  20.   } while (strlen(text) != 8);
  21.   strcpy(&(password[4]), text);
  22.   password[0] = text[7] ^ 6;
  23.   password[1] = 'a';
  24.   password[2] = 't';
  25.   password[3] = text[0] ^ text[1] ^ text[2] ^ text[3] ^ text[4] ^ text[5] ^
  26.                 text[6] ^ password[0] ^ 57;
  27.   printf("Password is: %s\n", password);
  28.   printf("Hex: %x %x %x %x %x %x %x %x %x %x %x %x\n", password[0], password[1],
  29.          password[2], password[3], password[4], password[5], password[6],
  30.          password[7], password[8], password[9], password[10], password[11]);
  31.   return 0;
  32. }